import axios from '@/libs/api.request'
// 用户列表
export const userList = data => {
    return axios.request({
      url: '/sys/user/list',
      method: 'get',
      data,
    })
  }

// 删除用户
export const userDelete = data => {
    return axios.request({
      url: '/sys/user/delete',
      method: 'post',
      data,
    })
  }
// 获取登录的用户信息
export const loginUserInfo = data => {
    return axios.request({
      url: '/sys/user/info',
      method: 'get',
      data,
    })
  }
  //用户信息
  export const userInfo = data => {
    return axios.request({
      url: `/sys/user/info/${data.userId}`,
      method: 'get',
      data,
    })
  }
   //修改密码
   export const userPassword = data => {
    return axios.request({
      url: `/sys/user/password`,
      method: 'post',
      data,
    })
  }
//保存用户
export const userSave = data => {
    return axios.request({
        url: `/sys/user/save`,
        method: 'post',
        data,
    })
}
//修改用户
export const userUpdate = data => {
    return axios.request({
      url: `/sys/user/update`,
      method: 'post',
      data,
    })
  }
  //重置密码
  export const userResetPwd = data => {
    return axios.request({
      url: `/sys/user/reset-pwd`,
      method: 'post',
      data,
    })
  }